package com.huanzhidadi.singleweb.pageinfo.controller;

import com.github.pagehelper.PageInfo;
import com.huanzhidadi.singleweb.pageinfo.model.ItemInVO;
import com.huanzhidadi.singleweb.pageinfo.model.ItemOutVO;
import com.huanzhidadi.singleweb.pageinfo.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("item")
public class ItemController {

    @Autowired
    private ItemService itemService;

    @PostMapping("getItemPage")
    public PageInfo<ItemOutVO> getItemPage(@RequestBody ItemInVO itemInVO) {
        return itemService.getItemPageInfo(itemInVO);
    }

}
